package cn.edu.hgu.service.impl;

import cn.edu.hgu.dao.NewsDao;
import cn.edu.hgu.dao.impl.NewsDaoImpl;
import cn.edu.hgu.entity.News;
import cn.edu.hgu.service.NewsService;

import java.util.List;

/**
 * 新闻接口实现层
 */
public class NewsServiceImpl implements NewsService {


    @Override
    public List<News> getListAll(News news) {
        NewsDao newsDao=new NewsDaoImpl();
        return newsDao.getListAll(news);
    }

    @Override
    public int add(List<Object> news) {
        NewsDao newsDao=new NewsDaoImpl();
        return newsDao.add(news);
    }

    @Override
    public int del(List<Object> news) {
        NewsDao newsDao=new NewsDaoImpl();
        return newsDao.del(news);
    }


    @Override
    public News getId(String id) {
        NewsDao newsDao=new NewsDaoImpl();
        return newsDao.getId(id);
    }

    @Override
    public int update(List<Object> news) {
        NewsDao newsDao=new NewsDaoImpl();
        return newsDao.update(news);
    }


}
